getUser Method |
This method retrieves the object that contains information about the current user, and the organizational properties that belong to the user.
Syntax
HTML |
oUser = system.getUser() |
Parameters
Parameter |
Description |
---|---|
oUser |
Object that contains information about the user, and the organizational properties that belong to the user. |
Remarks
The user property lists out information regarding the current user of the Process Platform Ajax Toolkit site. The properties and attributes that are exposed are as follows:
name |
String that denotes the description of the user currently using the site |
authUserDN |
String that denotes the DN of the authenticated user who is currently using the site |
defaultOrganization |
String that denotes the distinguished name of the default organization to which the user belongs to |
organizations |
Object that contains information about the organizations to which the user belongs to. The property is indexed by the DN of the organization and has the following properties:
|
To refresh the user details, you can usesystem.getUser(true).
Example
The following example shows how the user property is used to identify whether the user is in the default organization or not:
//Function call for user property function identifyCurrentOrg() { var userInfo = system.getUser(); if (userInfo.organizations[application.organization]) { //Identify if this is default if (userInfo.organizations[application.organization].isDefault) { //Show the DN of the user application.notify("DN : " + userInfo.organizations[application.organization].userDN); } } }